package org.lmw.note;

import java.lang.reflect.Type;
import java.util.List;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lidroid.xutils.db.annotation.Table;

@Table(name="note")
public class Note {

	private int id;
	private String text;
	private String createTime;
	private int status=0;//默认0 删除4
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	
	static Gson gson=new Gson();	
	public static Note parseObj(String gsonStr){
		return gson.fromJson(gsonStr, Note.class);
	}
	
	public static List<Note> parseList(String gsonStr){
		Type t=new TypeToken<List<Note>>(){}.getType();
		return gson.fromJson(gsonStr, t);
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}


	
}
